﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace INSTA.BankApplication.DAL
{
    public class MySqlSqlGenerator : AbstractSqlGenerator
    {
        /// <summary>
        /// Initializes a new instance of
        /// the <see cref="AbstractSqlGenerator" /> class.
        /// </summary>
        /// <param name="mapper">The mapper.</param>
        public MySqlSqlGenerator(DataMapper mapper) : base(mapper)
        {}

        /// <summary>
        /// Generates the SQL to get the last generated id, generated
        /// by the database engine.
        /// </summary>
        /// <returns>The last generated id</returns>
        public override string GenerateSQLFor_LastGeneratedId()
        {
            return "SELECT LAST_INSERT_ID();";
        }
    }
}
